/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import java.io.Serializable;

/**
 * 复合主键
 * @author liujiang
 * @version 2013-06-07
 */
public class SeasonMonthPK implements Serializable{
	
	private static final long serialVersionUID = 1L;
	private SystemDefinitionAreaSeason systemDefinitionAreaSeason; 		// 区域
	private SystemDefinitionMonth systemDefinitionMonth; 		// 月份
	
	public SeasonMonthPK() {
		
	}
	
	public SeasonMonthPK(SystemDefinitionAreaSeason systemDefinitionAreaSeason, SystemDefinitionMonth systemDefinitionMonth) {
		this.systemDefinitionAreaSeason = systemDefinitionAreaSeason;
		this.systemDefinitionMonth = systemDefinitionMonth;
	}
	
	public SystemDefinitionAreaSeason getSystemDefinitionAreaSeason() {
		return systemDefinitionAreaSeason;
	}

	public void setSystemDefinitionAreaSeason(
			SystemDefinitionAreaSeason systemDefinitionAreaSeason) {
		this.systemDefinitionAreaSeason = systemDefinitionAreaSeason;
	}

	public SystemDefinitionMonth getSystemDefinitionMonth() {
		return systemDefinitionMonth;
	}

	public void setSystemDefinitionMonth(SystemDefinitionMonth systemDefinitionMonth) {
		this.systemDefinitionMonth = systemDefinitionMonth;
	}

	@Override
	public int hashCode() {
		return this.systemDefinitionAreaSeason.hashCode() + this.systemDefinitionMonth.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final SeasonMonthPK other = (SeasonMonthPK) obj;
		if (systemDefinitionAreaSeason.getId() == other.getSystemDefinitionAreaSeason().getId() &&
				systemDefinitionMonth.getId() == other.getSystemDefinitionMonth().getId()) {
			return true;
		} 
		return false;
	}
}


